﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace Snake
{
    class GUI
    {
        SpriteFont f_timeFont;
        Vector2 f_timePos;
        int f_points = 0;
        DateTime f_time = DateTime.Now;
        public GUI(SpriteFont inFontTextur, Vector2 inVektor)
        {
            f_timeFont = inFontTextur;
            f_timePos = inVektor;
        }
        public int points {
            get {return f_points ;}
            set {f_points += value ;} 
        }
        public int Time {
            get {return (DateTime.Now - f_time).Seconds;} 
        }
        public void Draw(SpriteBatch inSpriteBatch)
        {
            inSpriteBatch.Begin();
            inSpriteBatch.DrawString(f_timeFont, (DateTime.Now - f_time).ToString().Substring(3,5), f_timePos,Color.White);
            inSpriteBatch.DrawString(f_timeFont, f_points.ToString(), new Vector2(525, 10), Color.White);
            inSpriteBatch.End();
        }
        public void reset()
        {
            f_points = 0;
            f_time = DateTime.Now;
        }
    }
}
